package com.cn.feign.service;

import com.cn.feign.service.impl.SchedualServiceHiHystric;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * 使用自身的熔断器，则需自定义熔断后的处理方式，若未打开熔断器，则不需设置fallback
 *
 * Feign熔断器打开,基于配置
 *
 * */
@FeignClient(value = "test-service",fallback = SchedualServiceHiHystric.class)
public interface FeignService {

    @RequestMapping(value = "/home",method = RequestMethod.GET)
    String homeFromFeign(@RequestParam(value = "name") String name);

}
